#ifndef __REGISTERLOGIN_H
#define __REGISTERLOGIN_H

#include "dlist.h"

//测试用
// #define ACCOUNT "12"
// #define PASSWORD "123"

#define PLACE_1(x,y)         ((80<=x&&x<160)&&(240<=y&&y<320))
#define PLACE_2(x,y)         ((160<=x&&x<240)&&(240<=y&&y<320))
#define PLACE_3(x,y)         ((240<=x&&x<320)&&(240<=y&&y<320))

#define PLACE_4(x,y)         ((80<=x&&x<160)&&(140<=y&&y<220))
#define PLACE_5(x,y)         ((160<=x&&x<240)&&(140<=y&&y<220))
#define PLACE_6(x,y)         ((240<=x&&x<320)&&(140<=y&&y<220))

#define PLACE_7(x,y)         ((80<=x&&x<160)&&(40<=y&&y<120))
#define PLACE_8(x,y)         ((160<=x&&x<240)&&(40<=y&&y<120))
#define PLACE_9(x,y)         ((240<=x&&x<320)&&(40<=y&&y<120))

#define PLACE_RIGNT(x,y)     ((80<=x&&x<160)&&(340<=y&&y<420))
#define PLACE_0(x,y)         ((160<=x&&x<240)&&(340<=y&&y<420))
#define PLACE_WRONG(x,y)     ((240<=x&&x<320)&&(340<=y&&y<420))

#define PLACE_REGISTER(x,y)  ((98<=x&&x<302)&&(165<=y&&y<240))
#define PLACE_LOGIN(x,y)     ((498<=x&&x<702)&&(165<=y&&y<240))
#define PLACE_RL_EXIT(x,y)   ((690<=x&&x<790)&&(340<=y&&y<440))
//账号栏密码栏
#define PLACE_ACCOUNT(x,y)     ((400<=x&&x<800)&&(240<=y&&y<320))
#define PLACE_PASSWORD(x,y)   ((400<=x&&x<800)&&(340<=y&&y<420))

#define MAX_ACCOUNT  6
#define MAX_PASSWORD 6

#define TOUCH_ACCOUNT_COLUMN  1
#define TOUCH_PASSWORD_COLUMN 2



enum RE_LOG_EXIT{
    REGISTER_BUTTON ,
    LOGIN_BUTTON ,
    RL_EXIT_BUTTON ,
};

int while_log_reg_exit(DNode_t* head , char* user_use_sys);
void select_login_register_show();
int touch_login_register();
void login_show();
void register_show();
void register_account(DNode_t*head);
void exit_account();
void login_show();
void login_account(char* user_use_sys);
void register_success(DNode_t*head ,char* loginScr_acc ,char* loginScr);

#endif